<h1>Import Products</h1>
    <?php if ($products):?>
<div class="alert alert-info">
    <h4>Products are imported successfully:</h4>
    <ul class="unstyled">
        <li><strong>Total imported</strong>: <?php echo $products;?> product<?php echo $products > 1 ? 's' : '';?></li>
        <?php if (is_array($categories) && count($categories)):?>
            <?php foreach ($categories as $categoryName => $total):?>
            <li><?php echo CHtml::tag('strong', array(), $categoryName).' : '.$total;?> product<?php echo $total > 1 ? 's' : '';?></li>
            <?php endforeach;?>
        <?php endif;?>
    </ul>
</div>
    <?php if (is_array($importImages) && count($importImages)):?>
    <h4>Do you want to import images for the following products:</h4>
    <p><?php $importImages = array_map('CHtml::encode',$importImages);echo implode(', ', $importImages);?></p>
    <div class="form">
        <?php echo CHtml::beginForm('', 'post', array('class'=>'form-horizontal'));?>
        <div class="control-group">
            <label class="control-label"> </label>
            <div class="controls">
                <?php echo CHtml::checkBox('import_image', false,array('style'=>'margin-top:0;'));?>
                <?php echo CHtml::hiddenField('file', $file);?>
                <?php echo CHtml::hiddenField('action', 'import_image');?>
                <label for="import_image" style="display: inline;">Import images</label>
            </div>
        </div>
        <?php
        cs()->registerScript(__CLASS__,"
        $('.buttons, .import-process').hide();
        $('#import_image').change(function(){
            if ($(this).is(':checked'))
                $('.buttons, .import-process').show();
            else
                $('.buttons, .import-process').hide();
        });
        ");
        ?>
        <div class="control-group buttons import-process">
            <div class="controls">
                <?php echo CHtml::submitButton('Import', array('class' => 'btn btn-primary')); ?>
            </div>
        </div>
        <?php echo CHtml::endForm();?>
    </div>
    <?php endif;?>
    <?php else:?>
    <h4>No products have been imported</h4>
    <?php endif;?>